<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
 <!-- 增加用户开始 -->
			<div id="dialog-message">
				  <form id="lable_from">
							<!-- <legend>Form</legend> --> 
							<input type="hidden" id="lablePid" value="${param.lableId}">
							 <table>
							 	<tr>
							 		<td width="50%">
								 		<fieldset>
											<label>标签名称：</label>
											<input type="text" id="name" value="" require='true' name="name" meth="notNull" maxlength="30"  title="标签不能为空" />
											<span class="help-block"></span> 
										</fieldset>
							 		</td>
							 		<td width="50%">
							 		<fieldset>
										<label>分值：</label>
										<input type="text" id="lableValue" value="5"  name="lableValue"  maxlength="1" disabled="disabled"/>
										<span class="help-block"></span> 
									</fieldset>
							 		
							 		</td>
							 	</tr>
							 	<tr>
							 	<td>
							 	
							 			所属教材：&nbsp;&nbsp;
			 							   <div style="float:right;width:155px;">
					   						<select class="width-155 form-control" id="jiaocai">
												  <c:forEach items="${applicationScope.jiaocai}" var="ctemp">
												 	<option value="${ctemp.value1}">${ctemp.value1}</option> 
												 </c:forEach>
											</select>
											</div>	
							 	 
							 		</td>
							 		<td>
							 			重要性：&nbsp;&nbsp;
			 							   <div style="float:right;width:155px;">
					   						<select class="width-155 form-control" id="lableImportance">
												<option value="1">一级</option>
												<option value="2">二级</option>
												<option value="3">三级</option>
												<option value="4">四级</option>
												<option value="5">五级</option>
												<option value="6">六级</option>
												<option value="7">七级</option>
												<option value="8">八级</option>
												<option value="9">九级</option> 
											</select>
											</div>	
							 		</td> 
							 	</tr> 
							 		<tr>
								 		<td>
								 			 <fieldset>
										<label>上级标签：</label>
										<input type="text" id="pName"  value="${param.name}"   name="pName" disabled="disabled"/>
										<span class="help-block"></span> 
									</fieldset> 
								 		</td> 
								 		
								 		<td>
		 								 
								 		</td>
							 	</tr> 
							 </table>  
						</form>			 
			</div>
			<!-- 增加用户结束-->
<script>
(function(){ 
	//增加用户
	 function addLable(contrl){
		var a =$("#lable_from").hzValidate("init");  
		if(a==false){
			return;
		}else{
			var object = OAajaxSubmit("lable_from"); 
			var url ="${pageContext.request.contextPath}/edu/sys_LableAction.do?method=addSysLable";
				$.ajax({
				   type: "POST",
				   url: url,
				   data: object,
				   dataType:'json',
				   success: function(msg){
				     	alert(msg.message);
				     	if(msg.code==1){
				     		window.lable.loadTree();
				     		window.lable.loadLable(null,{});
				     		$(contrl).dialog('destroy'); 
							$("#user_include").html("");
							window.learnPlant.loadTree();
				     	} 
				   }
				});
		}
	 };
	 $(function(){ 
		 
	 });
	 window.lableAdd={};
	 window.lableAdd.addLable=addLable; 
})()

</script> 